package org.jeecg.modules.AccessoriesCenter.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.AccessoriesCenter.entity.ButtonDaochuEntity;
import org.jeecg.modules.AccessoriesCenter.entity.ButtonEntity;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ButtonManageMapper {
    IPage<ButtonEntity> getButtonlist(Page<ButtonEntity> page, @Param("status") Integer status, @Param("buttonsName") String buttonsName, @Param("buttonsCode") String buttonsCode,@Param("categoryId") String categoryId);

    int updateButtonstatus(@Param("id") int id, @Param("status") int status);

    ButtonEntity getButtonbyId(@Param("id") int id);

    int addButton(ButtonEntity entity);

    //查询纽扣编号是否已经存在
    String getButtoncodebycode(@Param("buttonsCode") String buttonsCode);

    int updateButton(ButtonEntity entity);

    //查询所有的纽扣品类
    List<ButtonEntity> getallButtonCategory();


    List<ButtonDaochuEntity> getButtonDaochulist(@Param("status") Integer status,@Param("buttonsCode")  String buttonsCode,@Param("categoryId")  String categoryId);

    //通过供应商编号查询供应商id
    String getSysuserIdbyworkNo(@Param("workNo") String workNo);

    //循环插入excel中纽扣数据
    void addExcelButton(ButtonDaochuEntity buttonDaochuEntity);

    int getcategoryIdbyName(@Param("categoryName") String categoryName);

    String getSysuserIdbySysuserName(@Param("realname") String realname);


    void updateExcelButton(ButtonDaochuEntity buttonDaochuEntity);
}
